<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<script>
			var x = 9.656;
			alert(x.toFixed(2));     // 返回 9.66e+0
			alert(x.toFixed(4));     // 返回 9.6560e+0
			alert(x.toFixed(6));  
			
		</script>
	</head>
	<body>
	</body>
</html>